﻿using System;

namespace Yunzuan.Foundation.DataAccess
{
    public interface ITransaction : IDataContextBase, IDisposable
    {
        /// <summary>
        /// 回滚事务
        /// </summary>
        void RollBackTransaction();

        /// <summary>
        /// 提交事务
        /// </summary>
        void CommitTransaction();

        /// <summary>
        /// 提交事务
        /// </summary>
        /// <param name="isFailAutoRollback">是否自动回滚</param>
        void CommitTransaction(bool isFailAutoRollback);
    }
}
